package com.example.hanchen.yongkanggy.home.base;

import android.os.Bundle;
import android.view.View;
import android.widget.CompoundButton;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.hanchen.yongkanggy.utils.StatusBarCompat;

import me.jessyan.autosize.internal.CustomAdapt;


public class BaseFragment extends Fragment implements CompoundButton.OnCheckedChangeListener, CustomAdapt {//, CustomAdapt


    protected void initCheckBox() {

    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        initCheckBox();
    }

    @Override
    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
        if (isChecked) {
            StatusBarCompat.changeToLightStatusBar(getActivity());
        } else {
            StatusBarCompat.cancelLightStatusBar(getActivity());
        }
    }

    @Override
    public boolean isBaseOnWidth() {
        return false;
    }

    @Override
    public float getSizeInDp() {
        return 667;
    }
}